package main

import (
	"fmt"
	"sync/atomic"
)

func loadBox(box atomic.Value, v interface{}) {
	box.Store(v)
	fmt.Println(box.Load())
}

func main() {
	var box atomic.Value  // 下面调用了3次函数，就是复制了box3次
	v1 := [...]int{1,2,3}
	loadBox(box, v1)
	v2 := "Hello"
	loadBox(box, v2)
	v3 := 123
	loadBox(box, v3)
}
